{% extends "contact__lists_nav.html" %}

{% block content %}
<h3> Volunteers entered in the database: </h3> 

<div>

<table class='cbv_index'>

<tr>
<th> Edit Link </th>
<th> Category </th>
<th> Firstname </th>
<th> Lastname </th>
<th> Phones </th>
<th> Contact id </th>
<th> Volunteer id </th>
</tr>

{% for contact_and_volunteer in contacts_and_volunteers_list %}
  <tr class="{% cycle odd_row,even_row %}">
   <td> 
   <a href = "{% url formstates_wjContact.contacts.views.volunteer_edit main_object_id=contact_and_volunteer.1.id %}">  
     {{ contact_and_volunteer.0 }}    
   </a> 
   </td>  
   <td> 
     <ul>
      {% for interest in contact_and_volunteer.1.get_my_interests %}
        {{ interest }}
      {% endfor %}
     </ul>
     </td>
   <td> {{ contact_and_volunteer.0.first_name }} </td>
   <td> {{ contact_and_volunteer.0.last_name }} </td>
        
   <td>
     <ul>
      {% for phone in contact_and_volunteer.0.get_my_phones %}
        {{ phone.phone_number }}
      {% endfor %}
     </ul>
   </td>
   
   <td> {{ contact_and_volunteer.0.id }} </td>   
   <td> {{ contact_and_volunteer.1.id }} </td>           
  </tr>
  
{% endfor %}
</table>
</div>
{% endblock content %}